<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>测试用户账号</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
</head>
<body>
<div class="container mt-5">
    <div class="row justify-content-center">
        <div class="col-md-10">
            <div class="card">
                <div class="card-header bg-primary text-white">
                    <h4 class="mb-0"><i class="bi bi-people"></i> 测试用户账号</h4>
                </div>
                <div class="card-body">
                    <div class="alert alert-info">
                        <i class="bi bi-info-circle"></i>
                        <strong>多用户测试说明：</strong>
                        <ul class="mb-0 mt-2">
                            <li>在同一浏览器的不同标签页中，只能保持一个用户的登录状态</li>
                            <li>如果需要同时测试多个角色，请使用不同的浏览器（如Chrome、Firefox、Edge）</li>
                            <li>或者使用浏览器的隐私/无痕模式打开新窗口</li>
                        </ul>
                    </div>
                    
                    <div class="row">
                        <!-- 管理员账号 -->
                        <div class="col-md-6 mb-4">
                            <div class="card border-primary">
                                <div class="card-header bg-primary text-white">
                                    <h6 class="mb-0"><i class="bi bi-gear-fill"></i> 管理员账号</h6>
                                </div>
                                <div class="card-body">
                                    <table class="table table-sm">
                                        <tr>
                                            <td><strong>超级管理员</strong></td>
                                            <td>用户名: <code>admin</code><br>密码: <code>1</code></td>
                                        </tr>
                                        <tr>
                                            <td><strong>普通管理员</strong></td>
                                            <td>用户名: <code>admin2</code><br>密码: <code>admin123</code></td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 客服账号 -->
                        <div class="col-md-6 mb-4">
                            <div class="card border-info">
                                <div class="card-header bg-info text-white">
                                    <h6 class="mb-0"><i class="bi bi-headset"></i> 客服账号</h6>
                                </div>
                                <div class="card-body">
                                    <table class="table table-sm">
                                        <tr>
                                            <td><strong>客服1</strong></td>
                                            <td>用户名: <code>cussv</code><br>密码: <code>3</code></td>
                                        </tr>
                                        <tr>
                                            <td><strong>客服2</strong></td>
                                            <td>用户名: <code>service1</code><br>密码: <code>service123</code></td>
                                        </tr>
                                        <tr>
                                            <td><strong>客服3</strong></td>
                                            <td>用户名: <code>service2</code><br>密码: <code>service123</code></td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 普通用户账号 -->
                        <div class="col-md-6 mb-4">
                            <div class="card border-success">
                                <div class="card-header bg-success text-white">
                                    <h6 class="mb-0"><i class="bi bi-person"></i> 普通用户账号</h6>
                                </div>
                                <div class="card-body">
                                    <table class="table table-sm">
                                        <tr>
                                            <td><strong>用户1</strong></td>
                                            <td>用户名: <code>cus</code><br>密码: <code>2</code></td>
                                        </tr>
                                        <tr>
                                            <td><strong>用户2</strong></td>
                                            <td>用户名: <code>customer1</code><br>密码: <code>customer123</code></td>
                                        </tr>
                                        <tr>
                                            <td><strong>用户3</strong></td>
                                            <td>用户名: <code>customer2</code><br>密码: <code>customer123</code></td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 快速登录 -->
                        <div class="col-md-6 mb-4">
                            <div class="card border-warning">
                                <div class="card-header bg-warning text-dark">
                                    <h6 class="mb-0"><i class="bi bi-lightning"></i> 快速登录</h6>
                                </div>
                                <div class="card-body">
                                    <div class="d-grid gap-2">
                                        <a href="/login" class="btn btn-primary btn-sm">
                                            <i class="bi bi-box-arrow-in-right"></i> 前往登录页面
                                        </a>
                                        <button class="btn btn-outline-secondary btn-sm" onclick="openNewWindow()">
                                            <i class="bi bi-window-plus"></i> 新窗口登录
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="alert alert-warning">
                        <i class="bi bi-exclamation-triangle"></i>
                        <strong>客服对话测试流程：</strong>
                        <ol class="mb-0 mt-2">
                            <li>在浏览器A中登录普通用户账号（如 <code>cus</code>）</li>
                            <li>在浏览器B中登录客服账号（如 <code>cussv</code>）</li>
                            <li>用户访问客服页面选择客服开始对话</li>
                            <li>客服在工作台查看和回复用户消息</li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script>
    function openNewWindow() {
        window.open('/login', '_blank', 'width=600,height=700');
    }
</script>
</body>
</html> 